e4d1c7acae6dbe09dfdba66e5ad2486d6b13bc0f,src/org/exist/storage/ValueIndexFactory.java,ValueIndexFactory,deserialize,#number[]#number#number#,62

Before Change


		}
		
		/* xs:dateTime */
		else if(Type.subTypeOf(type, Type.DATE_TIME))		{
			//get the dateTime back as a long
			long value = ByteConversion.byteToLong(data, start + (ValueIndexFactory.LENGTH_VALUE_TYPE));
			//Create a GregorianCalendar from the long (normalized datetime as milliseconds since the Epoch)

After Change


		}
		
		/* xs:dateTime */
		else if(Type.subTypeOf(type, Type.DATE_TIME))		{
			//get the dateTime back as a long
			long value = ByteConversion.byteToLong(data, start + (ValueIndexFactory.LENGTH_VALUE_TYPE));
			//Create a GregorianCalendar from the long (normalized datetime as milliseconds since the Epoch)
			GregorianCalendar utccal = new GregorianCalendar();
			utccal.setTimeInMillis(value);
			//Create a XMLGregorianCalendar from the GregorianCalendar
			try
			{
				XMLGregorianCalendar xmlutccal = DatatypeFactory.newInstance().newXMLGregorianCalendar(utccal);
				return new DateTimeValue(xmlutccal);
			}
			catch(DatatypeConfigurationException dtce)
			{
				throw new EXistException("Could not deserialize xs:dateTime data type for range index key: " + Type.getTypeName(type) + " - " + dtce.getMessage());
			}
		}
		
    /* xs:date */
    else if(Type.subTypeOf(type, Type.DATE))   {
      //get the date back as a long
      long value = ByteConversion.byteToLong(data, start + (ValueIndexFactory.LENGTH_VALUE_TYPE));
      //Create a GregorianCalendar from the long (normalized datetime as milliseconds since the Epoch)
      GregorianCalendar utccal = new GregorianCalendar();
      utccal.setTimeInMillis(value);
      //Create a XMLGregorianCalendar from the GregorianCalendar
      try
      {
        XMLGregorianCalendar xmlutccal = DatatypeFactory.newInstance().newXMLGregorianCalendar(utccal);
        return new DateValue(xmlutccal);
      }
      catch(DatatypeConfigurationException dtce)
      {
        throw new EXistException("Could not deserialize xs:date data type for range index key: " + Type.getTypeName(type) + " - " + dtce.getMessage());
      }
      catch(XPathException xpe)
      {
        throw new EXistException("Could not deserialize xs:date data type for range index key: " + Type.getTypeName(type) + " - " + xpe.getMessage());
      }
    }